package net.malkuth.test.fragment;

import android.annotation.TargetApi;
import android.app.Fragment;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import net.malkuth.adapter.LectureAdapter;
import net.malkuth.data.Lecturedata;
import net.malkuth.test.R;

/**
 * Created by 一些年华 on 2016/7/7.
 * 授课
 */
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class LectureFragment extends Fragment {

    private ListView lecture_listview;
    private LectureAdapter adapter;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {


        return inflater.inflate(R.layout.fragment_lecture, container, false);
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        initView();
    }

    private void initView() {

        lecture_listview = (ListView) getActivity().findViewById(R.id.lecture_listview);
        adapter = new LectureAdapter(getActivity(), Lecturedata.getdata());
        lecture_listview.setAdapter(adapter);

    }


    @Override
    public void onResume() {
        super.onResume();
    }
}
